package com.journaldev.thread.chenhao;

/**
 * Thread.join()
 *
 * @author: chenhs
 * @date: Created in 15:50 2019/9/4
 **/
public class SubThreadJoin extends Thread {

    @Override
    public void run() {
        for (int i = 0; i <= 100; i++) {

            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

            System.out.println(Thread.currentThread().getName() +" : " + i);
        }
    }
}
